<template>
  <div>
    <el-alert
      v-if="adminLevel < requiredLevel"
      title="(⊙o⊙)…您的权限不能访问此页面"
      type="warning"
      :closable="false"
    ></el-alert>
    <div v-else>
      <form>
        <label class="radio-inline" @click="tab = true">
          <input type="radio" :checked="tab" />导入数据
        </label>
        <span class="space-1em"></span>
        <label class="radio-inline" @click="tab = false">
          <input type="radio" :checked="!tab" />导出数据
        </label>
      </form>
      <div class="card">
        <div class="card-body">
          <importView v-show="tab"></importView>
          <exportView v-show="!tab"></exportView>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import importView from "./importView.vue";
import exportView from "./exportView.vue";
export default {
  name: "ioView",
  components: {
    exportView,
    importView,
  },
  data() {
    return {
      tab: true,
      requiredLevel: 2,
    };
  },
  computed: {
    adminLevel() {
      return this.$store.getters.adminLevel;
    },
  },
  methods: {},
};
</script>

<style scoped>
</style>